import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //CYZ 登录注册使用
    isPhone:true,
    //登录得到的数据
    User:{},
    //CYZ 登录信息
    // DLorZC:{},
    //播放音乐的地址
    musicURL:"http://m8.music.126.net/20200813214554/ff0628186ee67f722c40f4aee4c65fc8/ymusic/0708/0308/535a/0b8d0dcdd24bbef5f4a0d019e5985e0b.mp3"
  },
  mutations: {
    //CYZ
    QiTa(state,payload){
      console.log(!state.isPhone)
      state.isPhone=!state.isPhone
    },
    ChangeMusicUrl(state,payload){
      state.musicURL=payload.data.data[0].url
      // console.log(payload.data.data[0].url)
      console.log(state.musicURL)
    },
    // PushUser(state,payload){
    //   state.User=payload
    //   console.log(state.User)
    // },
    // DeleteUser(state){
    //   state.User={}
    // }
    // Storage(state,payload){
    //   state.DLorZC=payload.data
    //   console.log(payload.data)
    //   // console.log( state.DLorZC)
    // },
    // DelDLorzc(state){
    //   state.DLorZC={}
    // }
  },
  actions: {

  },
  modules: {
  }
})
